/**
 * 抽屉
 */
import 'package:flutter_benchu/utils/commonPkg.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';

class DrawerWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: GFDrawer(
        child: Column(
          children: <Widget>[
            GFDrawerHeader(
              margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
              currentAccountPicture: GFAvatar(
                radius: 80.0,
                backgroundImage: NetworkImage(
                    "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3044363545,3938435263&fm=26&gp=0.jpg"),
              ),
              otherAccountsPictures: <Widget>[
                GFAvatar(
                    backgroundImage: NetworkImage(
                        "https://cdn.pixabay.com/photo/2019/12/20/00/03/road-4707345_960_720.jpg")),
                GFAvatar(
                    backgroundImage: NetworkImage(
                        "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.17qq.com%2Fimg_qqtouxiang%2F82478435.jpeg&refer=http%3A%2F%2Fwww.17qq.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1614833005&t=cafb63ccc7f3dce94470674e3e9787d9")),
                // GFAvatar(
                //   child: Text("ab"),
                // )
              ],
              child: Column(
                mainAxisAlignment: MainAxisAlignment.start,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Text('user name'),
                  Text('user@userid.com'),
                ],
              ),
            ),
            Expanded(
              child: EasyRefresh(
                  header: DeliveryHeader(), //头部刷新
                  bottomBouncing: false, //底部回弹效果
                  onRefresh: () async {
                    //下拉请求新数据
                  },
                  //需要上下拉刷新的组件 这里是CustomScrollView
                  child: ListView(
                    children: <Widget>[
                      ListTile(
                        title: Text('Item 1'),
                        onTap: null,
                      ),
                      ListTile(
                        title: Text('Item 2'),
                        onTap: null,
                      ),
                       ListTile(
                        title: Text('Item 1'),
                        onTap: null,
                      ),
                      ListTile(
                        title: Text('Item 2'),
                        onTap: null,
                      ),
                       ListTile(
                        title: Text('Item 1'),
                        onTap: null,
                      ),
                      ListTile(
                        title: Text('Item 2'),
                        onTap: null,
                      ),
                       ListTile(
                        title: Text('Item 1'),
                        onTap: null,
                      ),
                      ListTile(
                        title: Text('Item 2'),
                        onTap: null,
                      ),
                       ListTile(
                        title: Text('Item 1'),
                        onTap: null,
                      ),
                      ListTile(
                        title: Text('Item 2'),
                        onTap: null,
                      ),
                       ListTile(
                        title: Text('Item 1'),
                        onTap: null,
                      ),
                      ListTile(
                        title: Text('Item 2'),
                        onTap: null,
                      ),
                    ],
                  )),
            ),
          ],
        ),
      ),
    );
  }
}
